﻿using Rhino.Mocks;

using TrueCode.DependencyManager;

namespace Test.Util.AutoMock
{
  internal class CreateMockBuildAction : ICreateMock
  {
    public void Execute(IBuildSession context)
    {
      if(context.Instance == null)
        context.Instance = MockRepository.GenerateStub(context.SessionAim.Type);
      context.ExecuteNextBuildAction();
    }
  }
}